<?php
/**
 * 异常处理
 *
 * @copyright	http://www.easymvc.com
 * @author 		光哥  <439884988@qq.com>
 * @version		1.0 - 2012-03-26
 * @package		Frame
 *
 */
class Frame_Exception_Program extends Exception{
	
	public function __construct($message, $code=NULL)
    {
        parent::__construct($message, $code);
    }
    /**
     * (non-PHPdoc)
     * @see Exception::__toString()
     */
    public function __toString()
    {
	   return  $this->getFile()." thrown exception. <br /> ".$this->getMessage()." <br /> on line ".$this->getLine();
		
    }
	/**
	 * 返回异常对象
	 * @return object
	 */
	public  function getException (){
		print $this;	
	} 
	/**
	 * 
	 * @param object $exception
	 */
    public static function handler($exception)
    {
    	
        $exception->getException();
    }


}

?>